import {setServer} from "@/utils/axios";
import {deviceUrl} from "../../../url";
const request = setServer(deviceUrl);

// 查询监控策略
export function getMonitorStrategy(query) {
  return request({
    url: '/monitor/strategy/list',
    method: 'get',
    params: query
  })
}

// 详情
export function getStrategyDetail(id) {
  return request({
    url: '/monitor/strategy/'+id,
    method: 'get',
  })
}

// 增
export function addMonitorStrategy(query) {
  return request({
    url: '/monitor/strategy/',
    method: 'post',
    data: query
  })
}

// 改
export function updateMonitorStrategy(query) {
  return request({
    url: '/monitor/strategy/',
    method: 'put',
    data: query
  })
}

// 删
export function deleteMonitorStrategy(id) {
  return request({
    url: '/monitor/strategy/'+id,
    method: 'delete',
  })
}

// 查询策略类型
export function getStrategyType() {
  return request({
    url: '/monitor/strategy/list-type',
    method: 'get',
  })
}

// 策略绑定监控
export function strategyBindMonitor(query) {
  return request({
    url: '/monitor/strategy/bind-device',
    method: 'get',
    params: query
  })
}

